import {request} from "./request";

export function getUserData() {
  return request({
    url: '/api/users',
    method:'get'
  })
}


export function updateUserData(id, identity, name, build) {
  return request({
    url: '/api/users/edit',
    method: 'post',
    params: {
      id,
      identity,
      name,
      build
    }
  })
}

export function deleteUserData(id) {
  return request({
    url: '/api/users/delete',
    method: 'delete',
    params: {
      id
    }
  })
}

export function addition(name, identity, account, password, build) {
  return request({
    url: '/api/users/register',
    method: 'post',
    params: {
      name,
      identity,
      account,
      password,
      build
    }
  })
}